#include "stdafx.h"
#include "game_engine.h"

namespace rpg {

	void GameEngine::processKeyboard(float deltaTime) {
		GameCamera *activeGameCamera = mGameLevel.getActiveCamera();

		if(activeGameCamera != NULL) {
			if(mKeyboard->isKeyDown(OIS::KC_F1)) {
				activeGameCamera->setCameraView(CAMERA_VIEW_FROM_SOUTH_TO_NORTH);
			}

			if(mKeyboard->isKeyDown(OIS::KC_F2)) {
				activeGameCamera->setCameraView(CAMERA_VIEW_FROM_EAST_TO_WEST);
			}

			if(mKeyboard->isKeyDown(OIS::KC_F3)) {
				activeGameCamera->setCameraView(CAMERA_VIEW_FROM_NORTH_TO_SOUTH);
			}

			if(mKeyboard->isKeyDown(OIS::KC_F4)) {
				activeGameCamera->setCameraView(CAMERA_VIEW_FROM_WEST_TO_EAST);
			}
		}

/*		if(mKeyboard->isKeyDown(OIS::KC_LEFT) && mKeyboardNextRepeat < 0.0f) {
			mActor->turnLeft();
			mKeyboardNextRepeat = 0.5f;
		}

		if(mKeyboard->isKeyDown(OIS::KC_RIGHT) && mKeyboardNextRepeat < 0.0f) {
			mActor->turnRight();
			mKeyboardNextRepeat = 0.5f;
		}

		if(mKeyboard->isKeyDown(OIS::KC_UP) && mKeyboardNextRepeat < 0.0f && !mActor->isTurning()) {
			mActor->setMoveDistance(5, 5.0f);
		}*/

		if(mKeyboard->isKeyDown(OIS::KC_ESCAPE)) {
			quit();
		}
	}

}